package com.ternnetwork.batch.launcher;

import javax.annotation.Resource;

import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.scheduling.quartz.QuartzJobBean;
import org.springframework.stereotype.Component;
import org.springframework.web.context.support.SpringBeanAutowiringSupport;

import com.ternnetwork.persistence.dao.IBaseDao;


@Component("testLauncher")
public class TestLauncher extends QuartzJobBean{
	
	@Autowired@Qualifier("iBaseDao")
	private IBaseDao iBaseDao;
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1834224795310961994L;

	public  void launch(){
		
		//iBaseDao.findAll("", null);
	}

	@Override
	protected void executeInternal(JobExecutionContext context) throws JobExecutionException {
		
		
		//确保当前类可以使用使用spring注入
		SpringBeanAutowiringSupport.processInjectionBasedOnCurrentContext(this);
		// TODO Auto-generated method stub
		launch();
       
    } 







	
	
}
